#ifndef __QDialogs_H__
#define __QDialogs_H__


#include <Classes.hpp>
#include <System.hpp>


namespace QDialogs {


#pragma option push -b-
enum TOpenOption { ofShowHidden, ofOverwritePrompt, ofNoChangeDir, ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofShowHelp, ofHideReadOnly, ofReadOnly, ofViewDetail, ofViewIcon, ofViewList, ofPreview, ofAutoPreview };
#pragma option pop

typedef Set<TOpenOption, ofShowHidden, ofAutoPreview>  TOpenOptions;

typedef void __fastcall (__closure * TFileAddEvent) (System::TObject * Sender, const AnsiString Filename, const bool Readable, const bool Writeable, const bool Executable, bool & CanAdd);

// typedef void __fastcall (__closure * TFilePreviewEvent) (System::TObject * Sender, const AnsiString Filename, Qgraphics::TCanvas * Canvas, const Types::TRect & Rect, Qgraphics::TProgressEvent Progress, bool & Handled);

typedef void __fastcall (__closure * TFilterChangeEvent) (System::TObject * Sender, int NewIndex);

typedef void __fastcall (__closure *TDirChangeEvent)(System::TObject* Sender, const AnsiString Dir);

//typedef void __fastcall (__closure *TFileSelectedEvent) (System::TObject* Sender, Qtypes::PFileInfo AFile, bool Selected);

__interface IOpenDialog;
typedef System::DelphiInterface<IOpenDialog> _di_IOpenDialog;
__interface  INTERFACE_UUID("{D88505E5-3A59-D611-9577-00B0D006527D}") IOpenDialog  : public IInterface 
{
        
public:
        virtual void __fastcall CanClose(bool &CanClose) = 0 ;
        virtual void __fastcall DirChanged(WideString NewDir) = 0 ;
        virtual bool __fastcall FileAdd(const WideString Filename, const bool Readable, const bool Writeable, const bool Executable) = 0 ;
        // virtual void __fastcall FilePreview(const WideString Filename, Qgraphics::TCanvas* Canvas, const Types::TRect &Rect, Qgraphics::TProgressEvent Progress, bool &Handled) = 0 ;
        //virtual void __fastcall FileSelected(Qtypes::PFileInfo AFile, bool Selected) = 0 ;
        virtual void __fastcall FilterChanged(int Index) = 0 ;
        virtual void __fastcall Help(void) = 0 ;
};

__interface IFileDialogForm;
typedef System::DelphiInterface<IFileDialogForm> _di_IFileDialogForm;
class DELPHICLASS TOpenDialog;
__interface  INTERFACE_UUID("{D8C78BC3-15FB-D511-9898-94D131D16641}") IFileDialogForm  : public IInterface 
{
        
public:
        virtual void __fastcall GetOptions(TOpenDialog* OpenDlg, bool Accepted) = 0 ;
    //     virtual Qtypes::TFileInfos __fastcall GetSelected(void) = 0 ;
        virtual void __fastcall ListFiles(Classes::TStrings* List) = 0 ;
        virtual void __fastcall ResizePreview(const tagSIZE &NewSize) = 0 ;
        virtual void __fastcall SetOptions(TOpenDialog* OpenDlg) = 0 ;
};

extern PACKAGE TMetaClass* FileDialogFormClass;

}; // QDialogs


#include <TDialog.h>
#include <TCustomDialog.h>
#include <TOpenDialog.h>


#ifndef __BplVisual_H_Inside__
using namespace QDialogs;
#endif


#endif /* __QDialogs_H__ */
